<template>
    <div class="com">
        <div class="left">
        <p> 姓名: {{login.name}}</p>
        <p> 地址: {{login.address}}</p>
        <p> 学校: {{login.school}}</p>
    </div> 
    </div>
</template>
<script>

import { mapState } from 'vuex'
export default ({
    name:'com',
    computed:{
        ...mapState ({//因为是计算属性所以需要在计算中
            'login':state => state.login,
        }),
    },
})
</script>
<style lang="scss" scoped>
*{
    margin:0;
    padding: 0;
}
.com{
    width:300px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    background: gray;
    p{
        margin-top:30px;
    }
    .left{
        margin-top: 200px;
        font-size: 24px;
    }
}
</style>
